package com.ruoyi.proposal.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 提案查询DTO
 * 用于封装查询条件
 */
public class ProposalQueryDTO {
    /**
     * 状态
     */
    private String status;

    /**
     * 月份
     */
    private String month;

    /**
     *分数筛选
     */
    private String scoreStatus;

    /*
    * 节省金额筛选
    */
    private String savingStatus;

    /**
     * 部门名称
     */
    @JsonProperty("department_name")
    private String departmentName;

    /**
     * 提案人姓名
     */
    @JsonProperty("proposer_name")
    private String proposerName;

    /**
     * 当前页码
     */
    @JsonProperty("pageNum")
    private Integer pageNum = 1;

    /**
     * 每页显示条数
     */
    @JsonProperty("pageSize")
    private Integer pageSize = 10;

    // Getter和Setter方法

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public String getScoreStatus() {
        return scoreStatus;
    }

    public void setScoreStatus(String scoreStatus) {
        this.scoreStatus = scoreStatus;
    }

    public String getSavingStatus() {
        return savingStatus;
    }

    public void setSavingStatus(String savingStatus) {
        this.savingStatus = savingStatus;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    // 为前端传参department_name添加setter方法
    public void setDepartment_name(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getProposerName() {
        return proposerName;
    }

    public void setProposerName(String proposerName) {
        this.proposerName = proposerName;
    }

    // 为前端传参proposer_name添加setter方法
    public void setProposer_name(String proposerName) {
        this.proposerName = proposerName;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    // 为前端传参page添加setter方法
    public void setPage(Integer page) {
        // 前端页码从1开始，转换为OFFSET
        this.pageNum = (page != null && page > 0) ? page : 1;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    // 为前端传参size添加setter方法
    public void setSize(Integer size) {
        this.pageSize = size;
    }

}
